//
//  Subject.h
//  test
//
//  Created by Christian Speich on 11.01.08.
//  Copyright 2008 Christian Speich. All rights reserved.
//

#ifdef IPHONE
#  import <UIKit/UIKit.h>
#else
#  import <Cocoa/Cocoa.h>
#endif

@class Mark;
@class Lesson;

@interface Subject : NSObject {
	NSString *name;
	NSString *teacher;
	NSString *type;
	NSMutableArray* marks;
	NSMutableArray* lessons;
}

- (NSString*) name;
- (void) setName:(NSString*)name;

- (NSString*) teacher;
- (void) setTeacher:(NSString*)teacher;

- (NSString*) type;
- (void) setType:(NSString*)type;

- (NSArray*)marks;
- (void)addMark:(Mark*)mark;
- (void) removeMark:(Mark*)mark;

- (NSArray*) classMarks;
- (NSArray*) otherMarks;
- (NSArray*)marksForType:(NSString*)type andHalfyear:(int)hyear;

- (NSArray*)lessons;
- (void)addLesson:(Lesson*)lesson;

- (float)average;
- (float) averageForHalfYear:(int)hyear;

- (NSString*)xml;
- (NSString*)xmlWithOffset:(int)i;

@end
